package cn.byapps.hw.dao;

import cn.byapps.hw.entity.Clazz;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * ClazzDao
 */
public interface ClazzDao extends JpaRepository<Clazz, Integer> {
    /**
     * 根据班级ID获取班级
     *
     * @param clazzId 课程ID
     * @return 班级
     */
    @Query("select (u) from Clazz u where u.id = :clazzId")
    Clazz findPageById(Integer clazzId);

}